home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / akcl1615.lha / lsp / doc-file.lsp < prev    next >
Text File  |  1988-04-24  |  825b  |  25 lines

  1. (defun doc-file (file packages)
  2. ;;Write FILE of doc strings for all symbols in PACKAGES
  3. ;;This file is suitable for use with the find-doc function.
  4.   #+kcl
  5.   (and (member 'lisp packages)
  6.        (not (documentation 'setq 'function))
  7.        (load (format nil "~a../lsp/setdoc.lsp" si::*system-directory*)))
  8.   (with-open-file (st file :direction :output)
  9.    (sloop:sloop
  10.     for v in packages
  11.     do (setq v (if (packagep v) (package-name v) v))
  12.     do (sloop:sloop
  13.     for w in-package v
  14.     when  (setq doc (documentation w 'function))
  15.     do (format st "F~a~%~ain ~a package:~a" w
  16.            (cond ((special-form-p w) "Special Form ")
  17.              ((functionp w) "Function ")
  18.              ((macro-function w) "Macro ")
  19.              (t ""))
  20.            v
  21.            doc)
  22.     when (setq doc (documentation w 'variable))
  23.     do (format st "V~a~%Variable in ~a package:~a" w v doc)
  24.     ))))
  25.